using System.Collections.Generic;
using System.Threading.Tasks;
using CoreApp.DBModel;

namespace CoreApp.DBAccess
{
    /// <summary>
    /// 博客评论类仓库
    /// </summary>
    /// <typeparam name="ArticleInfo"></typeparam>
    public interface ICommentRepository : IRepositoryBase<CommentInfo>
    {
        /// <summary>
        /// 插入
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        Task<int> InsertComment(CommentInfo entity);        

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        Task<int> DeleteCommentById(int Id);

        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        Task<int> UpdateComment(CommentInfo entity);

        /// <summary>
        /// 获取
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        Task<CommentInfo> QueryComment(int Id);

        /// <summary>
        /// 根据参数获取列表
        /// </summary>
        /// <param name="dic"></param>
        /// <returns></returns>
        Task<List<CommentInfo>> GetListByParams(Dictionary<string, string> dic);
    }
}